package com.string;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class SumOfNumbersOnString {
public static void main(String[] args) {
	int i=sumofNumberOnString("deepak12kumar200goswami34");
	System.out.println(i);
}
public static int sumofNumberOnString(String s){
	
	int sum=0;
	Pattern p=Pattern.compile("\\d+");
	Matcher m=p.matcher(s);
	while(m.find()){
		sum=sum+Integer.parseInt(s.substring(m.start(),m.end()));
		
	}
	return sum;
}
}
